#!/usr/bin/python
#coding=utf-8

import ctypes
import time

so = ctypes.CDLL("../api/libupdDispatchApi.so")

dspIp="192.168.154.128"
dspPort=5001
service="updServer"
srvIp="192.168.154.128"
srvPort=3000

print "publish service [%s:%s:%d]" % (service, srvIp, srvPort)

if -1 == so.dspPubService(dspIp, dspPort, service, srvIp, srvPort):
	print "error"
else:
	while True:
		time.sleep(100)
